<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ include file="../../../common.jsp"%>
<script type="text/javascript">
function save() {
        var pagetype="add";   
        var TOKEN=$("#TOKEN").val();
        var tName=$("#tName").val();
        var sex=$("#sex").val();
        var edId=$("#edId").val();
        var birthday=$("#birthday").val();
        var teacher=$("#teacher").val();
        var teachPhone=$("#teachPhone").val();
        var genearch=$("#genearch").val();
        var genearchPhone=$("#genearchPhone").val();
        var remark=$("#remark").val();
        var introduction=$("#introduction").val();
        var url=$("#url").val();
    	$.post(url,
      	{	
    		pagetype:pagetype,
    		TOKEN:TOKEN,
    		tName:tName,
    		sex:sex,
    		edId:edId,
    		teacher:teacher,
    		teachPhone:teachPhone,
    		genearch:genearch,
    		genearchPhone:genearchPhone,
    		birthday:birthday,
    		remark:remark,
    		introduction:introduction
		},function(data)
				{
				$.pdialog.closeCurrent();
				}
		);
    	}
function save()
{
	document.getElementById('teacher').value=document.getElementById('teacherview.id').value;
	document.getElementById('genearch').value=document.getElementById('genearchview.id').value;
   	var auditForm=$("#form1");   
    auditForm.submit(); 
    $.pdialog.closeCurrent();
}
</script>
<div class="pageContent">
	<form id="form1" method="post" action="${rootDir }/daily/add.student.do" class="pageForm required-validate" onsubmit="return validateCallback(this, navTabAjaxDone);">
		<input type="hidden" name="TOKEN" id="TOKEN" value="${TOKEN}">
		<input type="hidden" name="pagetype" id="pagetype" value="add">	
		<input type="hidden" id="teacher" name="teacher"/>
		<input type="hidden" id="genearch" name="genearch"/>
		<div class="pageFormContent" layoutH="56">
			<p>
			  <label>姓名：</label>
				<input id="tName"  name="tName" class="required" type="text" size="30" alt="请输入姓名"/>
		  	</p>
			<p>
		    <label>性别：</label>
				<select id="sex" name="sex" class="combox">	
					<option value="" selected>请选择</option>			 
					<option value="0">男</option>
					<option value="1">女</option>
			</select> 
		  	</p>
			<p>
		    <label>班级：</label>
			<select id="classInfo" name="classInfo" class="combox">
				 <option value="" selected>请选择</option>
				 <c:forEach items="${classLst}" var="reslst" varStatus="status">
					<option value="${reslst.id}">${reslst.TName}</option>
				</c:forEach>	
			</select> 
			</p>
          		<p>
			  		<label>出生年月：</label>
					<input id="birthday" type="text" name="birthday" class="date" size="30" />
				</p>
			 	<p>
			  		<label>老师：</label>
			  		<input name="teacherview.id" id="teacherview.id" type="hidden" value=""/>
					<input id="teacherview" name="dwz.teacherview.orgName" type="text" suggestFields="orgNum,orgName" 
					suggestUrl="${rootDir }/select/list.teacher.do" lookupGroup="teacherview" value="" readonly="readonly" size="26" />
					<a class="btnLook" href="${rootDir }/select/list.teacher.do" lookupGroup="teacherview"  id="lookupCourseCate">查找带回</a>				
					
			 	</p>			
			 	<p>
			  		<label>家长：</label>					
					<input name="genearchview.id" id="genearchview.id" type="hidden" value=""/>
					<input id="genearchview" name="dwz.genearchview.orgName" type="text" suggestFields="orgNum,orgName" 
					suggestUrl="${rootDir }/select/list.genearch.do" lookupGroup="genearchview" value="" readonly="readonly" size="26" />
					<a class="btnLook" href="${rootDir }/select/list.genearch.do" lookupGroup="genearchview"  id="lookupCourseCate">查找带回</a>				
					
			 	</p>
			 	
			<p>
				<label>备注：</label> 
				<input id="remark" name="remark" type="text"
					size="30" value="" alt="" />
			</p>
			<div class="divider"></div>
			<p>
				<label>说明：</label>
				<textarea cols="50" rows="5" id="introduction" name="introduction"></textarea>
			</p>
			
			
</div>
		<div class="formBar">

			<ul>
				<!--<li><a class="buttonActive" href="javascript:;"><span>淇濆瓨</span></a></li>-->
				<li><div class="buttonActive">
				<div class="buttonContent">
				<button type="button" onclick="javascript:save()">保存</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
		</div>

	</form>
</div>
